#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
@author:atuo.cn
'''

from tkinter import *
from tkinter.ttk import *
from tkinter.simpledialog import Dialog

from dialogs.dialoghelper import DialogHelper

class PatternDialogLayout(Dialog, DialogHelper):
    def __init__(self, master, wmtitle):
        Dialog.__init__(self, master, wmtitle)

    #override method of Dialog to create main frame
    def body(self, master):
        self.label1 = Label(master, text="标题章节定位模式")
        self.label1.pack(anchor=W)
        self.listboxPatterns=Listbox(master,width=110,selectmod=SINGLE)
        self.listboxPatterns.pack(fill=BOTH, expand=1)
        
        self._bindEvents()
        self.onLoad()
                
    def _bindEvents(self):
        self.listboxPatterns.bind("<Double-Button-1>",self._eventhandler("pattern_selected"))
        
    def onLoad(self):
        pass

